package com.bdqn.t320.ch13.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.t320.ch13.entity.Right;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RightMapper extends BaseMapper<Right> {

    @Select("select * from sys_right r where r.right_code in(select rf_right_code from sys_role_right " +
            "where rf_role_id = (select usr_role_id from sys_user where usr_id=#{usrId}))")
    public List<Right> getRightByUsrId(Long usrId);
}
